n = int(input())
ord1 = 65
for i in range(n):
    for _ in range(n-i,0,-1):
        print(chr(ord1), end=" ")
        ord1 = ord1 + 1
    print("")
